package exercise5;
import javax.swing.JOptionPane;
public class Random {
	public static void printRandom() {
		Random random = new Random();
		int[] arr = new int[100];
		StringBuilder str=new StringBuilder();
		int [] numCount =new int[10];
        int [] nums=new int[100];
        for (int i = 0; i < 100; i++) {
        	nums[i] = (int) (Math.random() * 10);
        }
        for (int i : nums) {
            numCount[i]++;
        }
        for (int i =0;i<10;i++) {
            str.append("Count for"+ i+" is " +numCount[i]+"\n");
        }
        JOptionPane.showMessageDialog(null, str.toString());
	}
}
